package MianShi;

import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author wys
 * created in 16:36 2019/3/5
 */

class T extends Thread {
    @Override
    public void run() {
        super.run();
        System.out.println("当前线程名称是：" + getName());
        System.out.println("T run");
    }
}

class Q implements Runnable {
    @Override
    public void run() {
        System.out.println(" Q run ");
    }
}

class W implements Callable<Integer> {

    @Override
    public Integer call() throws Exception {
        System.out.println(" W run ");
        return null;
    }
}

public class ThreadDemo {

    public static void main(String args[]) {

        T ta = new T();
        // sleep是Thread 的静态方法  参数是秒为单位
        try {
            Thread.sleep(13124);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }


        Q q = new Q();
        new Thread(q, "q").start();


        W w = new W();
        FutureTask<Integer> task = new FutureTask<>(w);
        new Thread(task, "w").start();


    }

}

class ExectuorTest implements Executor {
    @Override
    public void execute(Runnable command) {

    }
}

class EQuence extends LinkedBlockingQueue {



}
